package shuzu;

import java.util.Random;

public class Program3 {
	public  static void main(String[] args){
		Random r = new Random();
		int a = 0,index = 0;
		int[] arr={1,2,3,4,5};
		int[] random = new int[5];
		for(int i=0;i<arr.length;i++){
			random[i] =  r.nextInt(arr.length);
			for(int j=0;j<i;j++){
				if (random[i] == random[j]){
					i--;
				}
			 }
		}
			while(a<arr.length){
				index = random[a];
				System.out.print(arr[index]);
				System.out.print(" ");
				a++;
		}
	}
}
